<%@ include file="../common.jsp"%>
 

<c:choose>
	<c:when test="${size eq 0}">
		<label class="formLabel" style="font-weight: bold;">No Records Found.</label>
	</c:when>
	<c:otherwise>
		<div style="width: 70%;">
			<table class="viewDetails">
				<tr class="adminTableMainHeaderColor tableChildHeaderFont">
					<th colspan="9" align="center"><span class="searchResultsCaption" >VIEW COMPANIES</span></th>
				</tr>
				
				<tr class="heading">
					<th>Name</th>
					<th>Type</th>
					<th>Code</th>
					<th>Company Address</th>
				</tr>	
			
				<c:forEach items="${companyMap}" var="companyMap" varStatus="loop">
				
					<c:set var="tabColor" value="odd"></c:set>
			     	<c:if test="${(loop.index % 2) eq 0}">
			        	<c:set var="tabColor" value="even"></c:set>
			        </c:if>
			    <tr class="${tabColor}">
					<td> ${companyMap.value.cdName} </td>
					<td> <c:if test="${fn:contains(companyMap.value.companyType,'GroupHead')}">Group company</c:if>
						 <c:if test="${fn:contains(companyMap.value.companyType,'StandAlone')}">Stand Alone company</c:if>
						 <c:if test="${fn:contains(companyMap.value.companyType,'Subsidiary')}">Subsidiary company</c:if> </td>
					<td> ${companyMap.value.cdCode} </td>
					<td> ${companyMap.value.address} ${companyMap.value.cdCity}  ${companyMap.value.cdDistrict}  ${companyMap.value.cdState} </td>
				</tr>	
				</c:forEach>	
			</table>
		</div>	
	</c:otherwise>
</c:choose>

